package org.jdbc_test.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @author ZJL
 * @date 2025-02-24
 */
public class Staffs implements Serializable {
    private int id;
    private String name;
    private int age;
    private String phone;
    private String staPos;
    private Date addTime;
    private Date updateTime;

    public Staffs() {
    }

    public Staffs(int id, String name, int age, String phone, String staPos, Date addTime, Date updateTime) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.phone = phone;
        this.staPos = staPos;
        this.addTime = addTime;
        this.updateTime = updateTime;
    }

    public int getId() { return id; }

    public void setId(int id) { this.id = id; }

    public String getName() { return name; }

    public void setName(String name) { this.name = name; }

    public int getAge() { return age; }

    public void setAge(int age) { this.age = age; }

    public String getPhone() { return phone; }

    public void setPhone(String phone) { this.phone = phone; }

    public String getStaPos() { return staPos; }

    public void setStaPos(String staPos) { this.staPos = staPos; }

    public Date getAddTime() { return addTime; }

    public void setAddTime(Date addTime) { this.addTime = addTime; }

    public Date getUpdateTime() { return updateTime; }

    public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        Staffs staffs = (Staffs) o;
        return id == staffs.id && age == staffs.age && phone == staffs.phone && Objects.equals(name, staffs.name) && Objects.equals(staPos, staffs.staPos) && Objects.equals(addTime, staffs.addTime) && Objects.equals(updateTime, staffs.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, age, phone, staPos, addTime, updateTime);
    }

    @Override
    public String toString() {
        return "Staffs{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", phone=" + phone +
                ", staPos='" + staPos + '\'' +
                ", addTime=" + addTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
